package com.weitu.emergency.service.impl;

import com.weitu.emergency.entity.EmergencySupplies;
import com.weitu.emergency.mapper.EmergencySuppliesMapper;
import com.weitu.emergency.service.EmergencySuppliesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author zhangqingxi 2017-05-10
 */
@Service
public class EmergencySuppliesServiceImpl implements EmergencySuppliesService {

    private final EmergencySuppliesMapper emergencySuppliesMapper;


    @Autowired
    public EmergencySuppliesServiceImpl(EmergencySuppliesMapper emergencySuppliesMapper) {
        this.emergencySuppliesMapper = emergencySuppliesMapper;
    }

    @Override
    public List<EmergencySupplies> findByParam(Map paramMap) {

        return emergencySuppliesMapper.findByParam(paramMap);
    }

    @Override
    public Integer findByParamCount(Map paramMap) {
        return emergencySuppliesMapper.findByParamCount(paramMap);
    }

    @Override
    public EmergencySupplies findById(String id) {
        return emergencySuppliesMapper.findById(id);
    }

    @Override
    public Integer add(Map paramMap) {
        return emergencySuppliesMapper.add(paramMap);
    }

    @Override
    public Integer updateById(Map paramMap) {
        return emergencySuppliesMapper.updateById(paramMap);
    }
}
